import { View, Node } from "cc";

interface Position {
  x?: number;
  y?: number;
  z?: number;
}

export class SetBasicInfo {
  view: View;

  /**
   * 设置节点位置
   * @param node 节点
   * @param options {@link Position}
   */
  static setPosition(node: Node, options: Position) {
    const { x, y, z } = { ...node.position, ...options };
    node.setPosition(x, y, z);
  }
}
